package ui.frame;
import static constants.GTextbookConstants.RESOURCE_DIRECTORY;

import java.awt.Toolkit;
import java.io.File;
import java.net.URL;

import javax.swing.ImageIcon;

public final class UIHelper
{
    public static ImageIcon readImageIcon(String filename)
    {
    	
        URL url = UIHelper.class.getResource(filename);
       
    	if (url == null)
            return null;
         return new ImageIcon(Toolkit.getDefaultToolkit().getImage(url));
    	//return new ImageIcon(RESOURCE_DIRECTORY+"/presentation/images/" + filename);
    }
}
